import { Router } from 'express';
import type { Request, Response } from 'express';
import authRouter from './auth';
import userRouter from './userRoutes';
import questionRouter from './questionRoutes';
import evaluationRouter from './evaluationRoutes';
import analysisRouter from './analysisRoutes';
import auditLogRouter from './auditLogRoutes';
import predictionRouter from './predictionRoutes';
import reportRouter from './reportRoutes';
import aiRouter from './ai.routes';
import scoringCriteriaRouter from './scoringCriteriaRoutes';
import teachingPointRouter from './teachingPointRoutes';
import dataManagementRouter from './dataManagementRoutes';
import statisticsRouter from './statisticsRoutes';
import teachingAnalysisRouter from './teachingAnalysisRoutes';

const router: Router = Router();

// 基础路由
router.get('/', (_req: Request, res: Response) => {
  res.json({
    status: 'ok',
    timestamp: new Date().toISOString(),
    environment: process.env.NODE_ENV,
  });
});

// 认证相关路由
router.use('/auth', authRouter);

// 用户管理路由
router.use('/users', userRouter);

// 题目相关路由
router.use('/questions', questionRouter);

// 评估相关路由
router.use('/evaluations', evaluationRouter);

// 分析相关路由
router.use('/analysis', analysisRouter);

// 审计日志路由
router.use('/audit-logs', auditLogRouter);

// 预测相关路由
router.use('/predictions', predictionRouter);

// 报告相关路由
router.use('/reports', reportRouter);

// AI相关路由
router.use('/ai', aiRouter);

// 评分标准路由
router.use('/scoring-criteria', scoringCriteriaRouter);

// 教学点管理路由
router.use('/teaching-points', teachingPointRouter);

// 数据管理路由
router.use('/data-management', dataManagementRouter);

// 统计分析路由
router.use('/statistics', statisticsRouter);

// 教学分析路由
router.use('/teaching-analysis', teachingAnalysisRouter);

export default router;
